linux: Fix current_vcpu_info for UP case
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 23 Feb 2007 10:43:00 +0000 (10:43 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 23 Feb 2007 10:43:00 +0000 (10:43 +0000)
Under !CONFIG_SMP, smp.h is not always included and hence
smp_processor_id() not always visible.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypervisor.h

index ffe031b601cfc646b959ee2c658177e701ce9e75..1690e2dc33dbe9c08ef6f47cdaa4462eb54b91f2 100644 (file)
 extern shared_info_t *HYPERVISOR_shared_info;
 
 #define vcpu_info(cpu) (HYPERVISOR_shared_info->vcpu_info + (cpu))
+#ifdef CONFIG_SMP
 #define current_vcpu_info() vcpu_info(smp_processor_id())
+#else
+#define current_vcpu_info() vcpu_info(0)
+#endif
 
 #ifdef CONFIG_X86_32
 extern unsigned long hypervisor_virt_start;